package huangcd.javanet.graphml;

import java.awt.*;

import edu.uci.ics.jung.graph.impl.DirectedSparseVertex;

public class JavaClassVertex extends DirectedSparseVertex {
    protected String nodeID;
    protected String className;
    protected String packageName;
    protected String description;
    protected Paint  fillPaint;
    protected Paint  drawPaint;
    protected double lengthOfCode;
    protected Shape  shape;
    protected double prebugNumber;
    protected double postbugNumber;

    public JavaClassVertex() {
        super();
        this.nodeID = "";
        this.className = "";
        this.packageName = "";
        this.description = "";
        this.lengthOfCode = 2.0;
        this.prebugNumber = 0.0;
        this.postbugNumber = 0.0;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public double getLengthOfCode() {
        return lengthOfCode;
    }

    public void setLengthOfCode(double lengthOfCode) {
        this.lengthOfCode = lengthOfCode;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public double getPostbugNumber() {
        return postbugNumber;
    }

    public void setPostbugNumber(double postbugNumber) {
        this.postbugNumber = postbugNumber;
    }

    public double getPrebugNumber() {
        return prebugNumber;
    }

    public void setPrebugNumber(double prebugNumber) {
        this.prebugNumber = prebugNumber;
    }

    public double getTotleBugNumber() {
        return prebugNumber + postbugNumber;
    }

    public String getNodeID() {
        return nodeID;
    }

    public void setNodeID(String nodeID) {
        this.nodeID = nodeID;
    }

    public Paint getDrawPaint() {
        return drawPaint;
    }

    public void setDrawPaint(Paint drawPaint) {
        this.drawPaint = drawPaint;
    }

    public Paint getFillPaint() {
        return fillPaint;
    }

    public void setFillPaint(Paint fillPaint) {
        this.fillPaint = fillPaint;
    }

    public Shape getShape() {
        return shape;
    }

    public void setShape(Shape shape) {
        this.shape = shape;
    }

    public String toString() {
        return className + "\n(bug  " + (int) getTotleBugNumber() + "; loc  " + (int) lengthOfCode
                        + ")";
    }
}
